package com.yupi.springbootinit.statemachine.enums;

import com.yupi.springbootinit.statemachine.core.State;

/**
 * 订单状态枚举
 * 实现制造业订单管理系统的订单状态流转
 * 状态流程：已创建 → 工艺已发布 → 排期已发布 → 生产中 → 检验中 → 已完成
 */
public enum OrderStateEnum implements State {
    
    CREATED("CREATED", "已创建", "ORDER"),
    ROUTING_PUBLISHED("ROUTING_PUBLISHED", "工艺已发布", "ORDER"),
    SCHEDULE_PUBLISHED("SCHEDULE_PUBLISHED", "排期已发布", "ORDER"),
    PRODUCING("PRODUCING", "生产中", "ORDER"),
    INSPECTING("INSPECTING", "检验中", "ORDER"),
    COMPLETED("COMPLETED", "已完成", "ORDER");
    
    private final String code;
    private final String description;
    private final String stateType;
    
    OrderStateEnum(String code, String description, String stateType) {
        this.code = code;
        this.description = description;
        this.stateType = stateType;
    }
    
    @Override
    public String getCode() {
        return code;
    }
    
    @Override
    public String getDescription() {
        return description;
    }
    
    @Override
    public String getStateType() {
        return stateType;
    }
}